#include <iostream>
#include <algorithm>

namespace MyUtil {

    int *generateRandomArray(int n, int rangeL, int rangeR) {

        assert(n > 0 && rangeL <= rangeR);

        int *arr = new int[n];

        srand(time(NULL));
        for (int i = 0; i < n; i++)
            arr[i] = rand() % (rangeR - rangeL + 1) + rangeL;
        return arr;
    }

    long long *generateOrderedArray(long long n) {

        assert(n > 0);

        long long *arr = new long long[n];

        for (long long i = 0; i < n; i++)
            arr[i] = i;
        return arr;
    }

}
